import Discover from "../pages/discover";
import React from "react"
import Playlist from "../pages/discover/playlist";
import Toplist from "../pages/discover/toplist";
import Friend from "../pages/friend";
import Mine from "../pages/mine";
import Page404 from "../pages/page404";
import Login from "../pages/login";
//类型声明
export type Iroute = {
    path: string;
    element: React.ReactNode;
    children?: Array<Iroute>
}

let routes: Array<Iroute> = [
    {
        path: "/discover",
        element: <Discover />,
        children: [
            {
                path: "playlist",
                element: <Playlist />
            },
            {
                path: "toplist",
                element: <Toplist />
            }
        ]
    },
    {
        path: "/login",
        element: <Login />
    },
    {
        path: "/friend",
        element: <Friend />
    },
    {
        path: "/mine",
        element: <Mine />
    },
    {
        path: "*",
        element: <Page404 />
    }
]


export default routes